package com.example.gulimall.order.controller;


import com.example.common.vo.order.PayAsyncVo;
import com.example.gulimall.order.service.OrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;


@Slf4j
@RestController
@RequestMapping("/order/pay")
public class PayCallbackController {

    @Autowired private OrderService orderService;

    @PostMapping("/alipay/success")
    public String aliAsyncNotify (PayAsyncVo vo, HttpServletRequest request) {
        return orderService.aliAsyncNotify(vo, request);
    }

}
